package com.eastjet.maintenance.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 权限功能表
 * @TableName device_function
 */
@TableName(value ="device_function")
@Data
public class DeviceFunction implements Serializable {
    /**
     * 功能编号
     */
    @TableId(type = IdType.AUTO)
    private Integer functionId;

    /**
     * 功能名称
     */
    private String functionName;

    /**
     * 功能等级
     */
    private Integer functionGrade;

    /**
     * 二级功能
     */
    private Integer functionParent;

    /**
     * 三级功能
     */
    private Integer functionParents;

    /**
     * 新增人
     */
    private String insertPerson;

    /**
     * 新增时间
     */
    private Date insertTime;

    /**
     * 更新人
     */
    private String updatePerson;

    /**
     * 更新时间
     */
    private Date updateTime;

    /**
     * 逻辑删除
     */
    private Integer isDelete;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        DeviceFunction other = (DeviceFunction) that;
        return (this.getFunctionId() == null ? other.getFunctionId() == null : this.getFunctionId().equals(other.getFunctionId()))
            && (this.getFunctionName() == null ? other.getFunctionName() == null : this.getFunctionName().equals(other.getFunctionName()))
            && (this.getFunctionGrade() == null ? other.getFunctionGrade() == null : this.getFunctionGrade().equals(other.getFunctionGrade()))
            && (this.getFunctionParent() == null ? other.getFunctionParent() == null : this.getFunctionParent().equals(other.getFunctionParent()))
            && (this.getFunctionParents() == null ? other.getFunctionParents() == null : this.getFunctionParents().equals(other.getFunctionParents()))
            && (this.getInsertPerson() == null ? other.getInsertPerson() == null : this.getInsertPerson().equals(other.getInsertPerson()))
            && (this.getInsertTime() == null ? other.getInsertTime() == null : this.getInsertTime().equals(other.getInsertTime()))
            && (this.getUpdatePerson() == null ? other.getUpdatePerson() == null : this.getUpdatePerson().equals(other.getUpdatePerson()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getIsDelete() == null ? other.getIsDelete() == null : this.getIsDelete().equals(other.getIsDelete()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getFunctionId() == null) ? 0 : getFunctionId().hashCode());
        result = prime * result + ((getFunctionName() == null) ? 0 : getFunctionName().hashCode());
        result = prime * result + ((getFunctionGrade() == null) ? 0 : getFunctionGrade().hashCode());
        result = prime * result + ((getFunctionParent() == null) ? 0 : getFunctionParent().hashCode());
        result = prime * result + ((getFunctionParents() == null) ? 0 : getFunctionParents().hashCode());
        result = prime * result + ((getInsertPerson() == null) ? 0 : getInsertPerson().hashCode());
        result = prime * result + ((getInsertTime() == null) ? 0 : getInsertTime().hashCode());
        result = prime * result + ((getUpdatePerson() == null) ? 0 : getUpdatePerson().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getIsDelete() == null) ? 0 : getIsDelete().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", functionId=").append(functionId);
        sb.append(", functionName=").append(functionName);
        sb.append(", functionGrade=").append(functionGrade);
        sb.append(", functionParent=").append(functionParent);
        sb.append(", functionParents=").append(functionParents);
        sb.append(", insertPerson=").append(insertPerson);
        sb.append(", insertTime=").append(insertTime);
        sb.append(", updatePerson=").append(updatePerson);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", isDelete=").append(isDelete);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}